package cn.iocoder.an.module.business.controller.admin.repairrequest.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import jakarta.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 维修申请新增/修改 Request VO")
@Data
public class RepairRequestSaveReqVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31397")
    private Long id;

    @Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String repairNo;

    @Schema(description = "故障分类id", requiredMode = Schema.RequiredMode.REQUIRED, example = "13506")
    @NotNull(message = "故障分类id不能为空")
    private Long faultId;

    @Schema(description = "设备id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16075")
    @NotNull(message = "设备不能为空")
    private Long equipmentId;

    @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    private String equipmentName;

    @Schema(description = "故障发生时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "故障发生时间不能为空")
    private LocalDateTime faultTime;

    @Schema(description = "申请人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3650")
    @NotNull(message = "申请人不能为空")
    private Long requestUserId;

    @Schema(description = "申请人", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    private String requestUserName;

    @Schema(description = "紧急程度", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "紧急程度不能为空")
    private Integer urgency;

    @Schema(description = "故障描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
    @NotEmpty(message = "故障描述不能为空")
    private String description;

    @Schema(description = "维修方式", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "维修方式不能为空")
    private Integer repairWay;

    @Schema(description = "维修人ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "661")
    @NotEmpty(message = "维修人不能为空")
    private List<Long> dutyUserId;

    @Schema(description = "维修人名称", example = "李四")
    private String dutyUserName;

    @Schema(description = "状态", example = "1")
    private Integer status;

    @Schema(description = "是否解决")
    private Integer resolved;

    @Schema(description = "期望解决日期")
    private Date expectedResolveTime;

}